package org.rand;

import java.util.Random;
import java.util.UUID;

public class UuidDemo {
    public static void main(String[] args) {
        //Math.random();
        //Random rand = new Random();
        //uuid guid(全球唯一随机字符串)

        System.out.println(UUID.randomUUID());
        System.out.println(UUID.randomUUID());
        System.out.println(UUID.randomUUID());

        //种子值
        Random rand = new Random(0);
        System.out.println(rand.nextInt(5));
        System.out.println(rand.nextInt(5));
        System.out.println(rand.nextInt(5));
        System.out.println(rand.nextInt(5));
        System.out.println(rand.nextInt(5));
        System.out.println(rand.nextInt(5));

        //System.out.println(rand.nextInt(5));
        //System.out.println(rand.nextInt(5));
        //System.out.println(rand.nextInt(5));
        //System.out.println(rand.nextInt(5));
        //System.out.println(rand.nextInt(5));

    }
}
